#include "list.h"
#include <stdlib.h>
#include <string.h>

List *list_init(size_t long)
{
    return *(List *)
    {
        .long = long;
        .first = malloc(sizeof(Node));
    }
}

void list_free(List *l)
{
    Node *p = l->first;
    for(; p; p = p->next)
    {
        Node *q = p;
        free(q);
    }
}

void list_append_node(List *l, Node *n)
{
    Node *p = l -> first;
    for(; p->next; p = p -> next);
    p->next = n;
}

void list_search_node(List *l, size_t position)
{
    Node *p = l -> first;
    for(; position != 0 && p; position--, p = p->next);
    return p;
}

void list_delete_node(List *l, Node *n)
{
    Node *p = l -> first;
    for(;
            }
